Send email suggestions, bug reports, comments to any of the addresses listed at the end of this document.
Shareware
FatMan took some time to develop, like most software. Hopefully it will save you time and improve your productivity, like most software. If FatMan helps you, you should feel obligated to pay for it, like most software. FatMan is $20, if you find it useful, please send a check or money order to the address below and thanks for your support. By paying for the software you use, you encourage revisions, new features, and higher-quality products from all software developers.
If you received this software as part of my book, A Fragment of Your Imagination, published by Addison-Wesley, you need not pay for it. I hope you enjoy the book!
Special Note
FatMan is changing and moving as you read this. Be sure to check the TripleSoft areas on America Online and eWorld (see contact information below) for the latest version. Eventually we hope to make FatMan even more useful to developers by adding more neat features. Keep in touch with us and we will do the same.
How To Use FatMan
FatMan allows you to easily create Fat and Safe Fat resources for use on your Power Macintosh or 680x0 Macintosh. FatMan gives you control over your source data and also the target file and resource. Selecting Preferences… from the Edit menu allows you to set the following attributes:
• Resource Type and ID of the target resource
• File Type and Creator of the target file
• Whether or not to set the kUseCurrentISA flag in the destination RoutineRecords
• Whether or not to copy the resources from the 680x0 file and/or the PowerPC file to the destination file
NOTE: 680x0 is copied first. Any resources in PowerPC that are also in 680x0 will overwrite those copied from 680x0. THIS FEATURE IS NOT IMPLEMENTED IN THIS VERSION BUT WILL BE SOON.
• Resource Type and ID of the source 680x0 resource
• Whether or not the source 680x0 resource is multi-segment or not
• Source of PowerPC code (Shared Library data fork or resource Type and ID)
• If the RoutineDescriptor (native header) should be stripped from the PPC code (only if it is from a resource)
NOTE: If you mark the source 680x0 resource as being multi-segment, FatMan will copy the associated ---x resource from the source 680x0 file into the target file. That is, if you are using Metrowerks CodeWarrior, when you create a multi-segment code resource of type ‘KODE’, CodeWarrior creates a “support” resource of type ‘KODx’. This option will automatically copy the ‘KODx’ resource to the target file.
NOTE: If the Shared Library option is checked, the PowerPC code should be stored in a shared library, or the data fork of the chosen file. Otherwise, FatMan will obtain the PowerPC code from the resource Type and ID you specify, and optionally remove a native RoutineDescriptor from it.
Once your preferences are set the way you need them, select either Make Fat Resource… or Make Safe Fat Resource… from the File menu. You will be prompted to for the following information, in order:
• Choose your 680x0 source file that contains the resource specified in the preferences
• Choose your PowerPC code. This code must be either a shared library (if the shared library option is checked in the preferences) or a file containing a resource of the type specified in the preferences. If the code is resource-based, you should check the Remove RoutinDescriptor option if it has a native RD pre-attached to it. I have found that the only valid way to create Fat or Safe Fat resources is to use a PPC code resource compiled with a Native RD pre-attached. If I use anything else I end up getting bogus PEFs that the Code Fragment Manager can not prepare properly. This may have been a CodeWarrior anomily, not sure right now.
• Type in the DECIMAL value of the procInfo for the routine you are creating (see ProcInfo Calculator below)
• Choose a destination to store the newly created resource
The file that is created will contain your Fat or Safe Fat resource, ready to go on the Power Macintosh.
How To Use The ProcInfo Calculator
The ProcInfo Calculator allows you to easily calculate the procInfo value for any function. By selecting items from the the easy to follow popup menus, you can specify any function calling convention possible. The DECIMAL value of the procInfo appears at the bottom of the dialog at all times.
For your convenience, you can even access the ProcInfo Calculator from the procInfo entry dialog when you are creating a Fat or Safe Fat resource.
Unfortunately this dialog is a bit slow, or should I say, that the Dialog Manager is a bit slow. I hope to speed this up in future versions.
Technical Jargon
• The ProcInfo Calculator may allow you to make impossible procInfo values. Some obvious mistakes are prevented from happening by the clever hiding and showing of dialog items. Be aware, you MUST understand what you are doing. ProcInfo Calculator makes no attempt to teach you anything about the Mixed Mode Manager. It is assumed that you have and read Inside Macintosh: PowerPC System Software. If you don’t have it, get it!
• The Fat “template” that is used internally is that found in MixedMode.r as of the release of this version.
• The Safe Fat “template” that is used internally is that found in MixedMode.r as of the release of this version.
• The kRoutineDescriptorVersion that is used internally is that found in MixedMode.r as of the release of this version.
• The templates set the following flags when creating a Fat or Safe Fat resource, currently these are not editable: